package com.flyco.modules.sms.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.flyco.modules.sms.entity.SmsDiscountProductRelation;
import com.flyco.modules.sms.mapper.SmsDiscountProductRelationMapper;
import com.flyco.modules.sms.service.ISmsDiscountProductRelationService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: 满减满折商品关联
 * @Author: flyco
 * @Date:   2020-05-06
 * @Version: V1.0
 */
@Service
public class SmsDiscountProductRelationServiceImpl extends ServiceImpl<SmsDiscountProductRelationMapper, SmsDiscountProductRelation> implements ISmsDiscountProductRelationService {

    @Override
    public List<SmsDiscountProductRelation> queryProductyRelationById (Long id) {
        LambdaQueryWrapper<SmsDiscountProductRelation> productyQuery = new LambdaQueryWrapper<>();
        productyQuery.eq(SmsDiscountProductRelation::getDiscountId,id);
        return this.list(productyQuery);
    }
}
